import { service as request} from '@/utils/request_web'

/**
 * 日报
 */
export function getCalendarPlan(params) {
  return request({
    url: `/Work/workschedule/`,
    method: 'get',
    params
  })
}

export function createCalendarPlan(data) {
  return request({
    url: `/Work/workschedule/`,
    method: 'post',
    data
  })
}

export function updateCalendarPlan(id, data) {
  return request({
    url: `/Work/workschedule/${id}/`,
    method: 'patch',
    data
  })
}

export function deleteCalendarPlan(id) {
  return request({
    url: `/Work/workschedule/${id}/`,
    method: 'delete'
  })
}

/**
 * 周报
 */
 export function getWeekSchedule(params) {
  return request({
    url: `/Work/week_workschedule/`,
    method: 'get',
    params
  })
}

export function createWeekSchedule(data) {
  return request({
    url: `/Work/week_workschedule/`,
    method: 'post',
    data
  })
}

export function updateWeekSchedule(id, data) {
  return request({
    url: `/Work/week_workschedule/${id}/`,
    method: 'patch',
    data
  })
}

export function deleteWeekSchedule(id) {
  return request({
    url: `/Work/week_workschedule/${id}/`,
    method: 'delete'
  })
}
/**
 * 年报
 */
 export function getYearSchedule(params) {
  return request({
    url: `/Work/year_workschedule/`,
    method: 'get',
    params
  })
}

export function createYearSchedule(data) {
  return request({
    url: `/Work/year_workschedule/`,
    method: 'post',
    data
  })
}

export function updateYearSchedule(id, data) {
  return request({
    url: `/Work/year_workschedule/${id}/`,
    method: 'patch',
    data
  })
}

export function deleteYearSchedule(id) {
  return request({
    url: `/Work/year_workschedule/${id}/`,
    method: 'delete'
  })
}
// 将周报推送到大屏
export function pushWeekScheduleToScreen(data) {
  return request({
    url: `/Work/push_schedule/`,
    method: 'post',
    data
  })
}